package cn.mrlong.tools.service

import cn.mrlong.tools.bean.Note

interface NoteService : CommonService<Note?> {
    /**
     * @param chapterId 章节id
     * @return 章节下所有的笔记
     */
    fun findAllByChapterId(chapterId: Int?): List<Note?>?

    /**
     * 删除指定章节下的所有笔记
     *
     * @param chapterId 章节id
     */
    fun deleteAllByChapterId(chapterId: Int?)

    /**
     * 删除指定笔记本下的所有笔记
     *
     * @param notebookId 笔记本id
     */
    fun deleteAllByNotebookId(notebookId: Int?)

    /**
     * 获取指定笔记本,指定章节下的全部标题
     *
     * @param notebookTitle 笔记本标题
     * @param chapterTitle  章节标题 (注意,笔记本标题,全局不重复,. 而章节标题只是同一笔记本下不重复)
     * @return 同一章节下全部标题
     */
    fun getTitles(notebookTitle: String?, chapterTitle: String?): List<String?>?

    fun findByTitle(noteName: String?, chapterId: Int?): Note?

    fun findByTitles(noteTile: String?, chapterTitle: String?, notebookTitle: String?): Note?


    fun getImageRecordsByNotebookId(notebookId: Int): List<String?>?

    fun getImageRecordsByChapterId(chapterId: Int): List<String?>?

    fun getImageRecordsByNoteId(noteId: Int): List<String?>?
}
